<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 14318
  Date: 2021/12/3
  Time: 22:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>

    <title>修改数据</title>

</head>

<body>

<form action="${pageContext.request.contextPath}/edit" method="post">

    <input type="hidden" name="id" value="${data.id}"><!-- 编辑数据要将记录id作为隐藏字段传过去 -->

    学号：<input type="text" name="code" value="${data.code}"><br>

    姓名：<input type="text" name="username" value="${data.username}"><br>

    年龄：<input type="text" name="age" value="${data.age}"><br>

    性别：

    <select name="gender">

        <option ${data.gender=='男'?'selected':''}>男</option>

        <option ${data.gender=='女'?'selected':''}>女</option>

    </select><br>

<%--    密码：<input type="text" name="password" value="${data.password}"> <br>--%>

    <input type="submit" value="更新">

</form>

</body>

</html>

